package cn.iocoder.yudao.module.system.controller.admin.gugu.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 智能推荐大学请求 VO
 *
 * @author 芋道源码
 */
@Schema(description = "管理后台 - 智能推荐大学请求 VO")
@Data
public class CollegeRecommendReqVO {

    @Schema(description = "页码", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "页码不能为空")
    @Min(value = 1, message = "页码最小值为 1")
    private Integer pageNum;

    @Schema(description = "每页条数", requiredMode = Schema.RequiredMode.REQUIRED, example = "20")
    @NotNull(message = "每页条数不能为空")
    @Min(value = 1, message = "每页条数最小值为 1")
    @Max(value = 100, message = "每页条数最大值为 100")
    private Integer pageSize;

    @Schema(description = "年份", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024")
    @NotNull(message = "年份不能为空")
    private Integer year;

    @Schema(description = "省份", requiredMode = Schema.RequiredMode.REQUIRED, example = "江苏")
    @NotBlank(message = "省份不能为空")
    private String province;

    @Schema(description = "高考总分", requiredMode = Schema.RequiredMode.REQUIRED, example = "580")
    @NotNull(message = "高考总分不能为空")
    @Min(value = 0, message = "分数不能为负数")
    @Max(value = 900, message = "分数不能超过900")
    private Integer score;

    @Schema(description = "省内位次", example = "15000")
    private Integer ranks;

    @Schema(description = "选科组合", requiredMode = Schema.RequiredMode.REQUIRED, example = "物理,化学,生物")
    @NotBlank(message = "选科组合不能为空")
    private String subjects;

    @Schema(description = "考试类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "物理")
    @NotBlank(message = "考试类型不能为空")
    private String classify;

    @Schema(description = "录取批次", example = "本科批")
    private String batch;

    @Schema(description = "最低分数", example = "570")
    private Integer minScore;

    @Schema(description = "最高分数", example = "590")
    private Integer maxScore;

    @Schema(description = "推荐类型", example = "CHONG")
    private String type;

    @Schema(description = "偏好设置")
    private PreferencesVO preferences;

    /**
     * 偏好设置内部类
     */
    @Schema(description = "偏好设置")
    @Data
    public static class PreferencesVO {

        @Schema(description = "地域偏好", example = "[\"江苏\", \"上海\"]")
        private List<String> regions;

        @Schema(description = "学校类型偏好", example = "[\"985\", \"211\"]")
        private List<String> schoolTypes;

        @Schema(description = "专业类别偏好", example = "[\"工学\", \"理学\"]")
        private List<String> majorCategories;
    }
}
